package oo2;

public class Lottery {

	public static void main(String[] args) {
		int[] ar = new int[7];
		for (int i = 0; i < 6; i++) {
			ar[i] = (int) (Math.random() * 33 + 1);
			// 从0到i-1,必须判断有没有和ar[i]相同的
			for (int j = 0; j <= i - 1; j++) {
				if (ar[j] == ar[i]) {
					// System.out.println("重复了");
					i--;// !!!!!!
					break;
				}
			}
		}

		for (int i = 0; i < 6; i++) {
			System.out.print(ar[i] + " ");
		}
	}

}
